Operating system virtualization enables a host computer or server to run multiple operating systems on a single host computer. That is, operating system virtualization makes it possible to run multiple guest operating systems (e.g., virtual machines (VM) or guests) on top of a virtual machine monitor (VMM), while the VMM is running on a computer. Using operating system virtualization allows fully utilization the power of a single computer or servers in a data center, and reduces the amount of money spent on computer hardware. Thus, operating system virtualization has becomes very popular in recent years.
Many years ago, International Business Machines Corporation (IBM) of Armonk, N.Y. developed software configured to run multiple VMs on mainframe computers. However, IBM's software is not portable to computers using Intel® x86-based computer hardware.
In late 1990's, VMWare, Inc. (VMWare) of Palo Alto, Calif. developed a technology called binary code translation that provided x86-based operating system virtualization. VMWare's technology used translated binary code to catch the VM trap instruction, and is known as a full virtualization approach. A different approach, para-virtualization (PV) was developed by XenSource, Inc. In PV approach, privileged instruction in the VM source code are modified to build hypercalls, which produces better performance than full virtualization. Since 2006, Intel Corporation (Intel) of Santa Clara, Calif. and Advanced Micro Devices, Inc. (AMD) of Sunnyvale, Calif. have both released new computer hardware that supports virtualization. These computer hardware allows improved performance of full virtualization and para-virtualization systems. Furthermore, the Linux operating system includes a VMM, called KVM (kernel-based virtual machine). Linux's KVM relies the Intel/AMD computer hardware for its support.
In 2006, Qumranet, Inc. (now part of RedHat Inc. of Raleigh, N.C.) took advantage of a processor emulator called QEMU and VIRTIO technology to build most of the KVM of Linux 2.6. This KVM serves as the base of Linux virtualization. Specifically, QEMU is a processor emulator that relies on dynamic binary translation. VIRTIO, an I/O (input/output) standard for virtualization, runs inside of QEMU as a frontend, while VIRTIO backend runs inside of a kernel of the Linux operating system. This enables guests to get high performance network and disk operations, and gives most of the performance benefits of para-virtualization. KVM, on the other hand, takes advantage of the privilege instructions of Intel VTx and AMD SVM (VTx/SVM) technology to build a virtual environment. This privilege instruction can allow the VM kernel to have a higher privilege relative to its application under non-root operation, while it is able to maintain all the high-performance components of a Linux kernel (e.g., task scheduling and memory management).
The KVM process to generate a VM can involve a multi-activity process. First, when a modified QEMU is started as a normal Linux process, QEMU uses system calls to a virtual central processing unit (VCPU) provided by the KVM. The VCPU generates a VM, and also creates many additional virtual CPUs (e.g., each CPU is a QEMU thread), similar to the process used by an operating system of a real computer that is running a multi-core mainboard. At start-up, the kernel-mode KVM uses VTx/SVM instructions to convert the physical mainboard into a guest-mode to execute VCPU threads. Afterwards, KVM uses VTx/SVM instructions to interrupt x86 privileged instructions such as VM system error, interrupt, memory mapping I/O (or MMIO), etc. When an interrupt event occurs, the CPU exits from guest mode to enter host kernel mode, and executes KVM code. KVM handles a simple interrupt quickly. However, for I/O interrupts, the KVM exits from VCPU system call to enter QEMU, which handles the I/O interrupts. In some implementations, QEMU can run as a process under host user mode. For example, QEMU can translate VM virtual memory address, uses Linux system call to access hardware disk, completes VM virtual memory read/write, and then updates the state of its emulated registers. Thus, QEMU looks very much like a hardware disk and the emulated way by which QEMU handles I/O decreases system performance.
The KVM method described above can be considered a “limited para-virtualization” method, which is not of enterprise grade because its performance and functionalities cannot compare to any of the commercial operating system virtualization products in the market, such as VMWare®, Xen®, and Hyper-V.
Accordingly, a need or potential for benefit exists for an apparatus or system that provides an enterprise-grade VMM for the Linux operating system platform.
For simplicity and clarity of illustration, the drawing figures illustrate the general manner of construction, and descriptions and details of well-known features and techniques may be omitted to avoid unnecessarily obscuring the invention. Additionally, elements in the drawing figures are not necessarily drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to other elements to help improve understanding of embodiments of the present invention. The same reference numerals in different figures denote the same elements.
The terms “first,” “second,” “third,” “fourth,” and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms “include,” and “have,” and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, device, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, system, article, device, or apparatus.
The terms “couple,” “coupled,” “couples,” “coupling,” and the like should be broadly understood and refer to connecting two or more elements or signals, electrically, mechanically and/or otherwise. Two or more electrical elements may be electrically coupled but not be mechanically or otherwise coupled; two or more mechanical elements may be mechanically coupled, but not be electrically or otherwise coupled; two or more electrical elements may be mechanically coupled, but not be electrically or otherwise coupled. Coupling may be for any length of time, e.g., permanent or semi-permanent or only for an instant.
“Electrical coupling” and the like should be broadly understood and include coupling involving any electrical signal, whether a power signal, a data signal, and/or other types or combinations of electrical signals. “Mechanical coupling” and the like should be broadly understood and include mechanical coupling of all types.